package my.learn.server.controller;

import my.learn.server.entity.WechatUser;
import my.learn.server.service.impl.UserServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")

public class UserController {

    static final Logger log = LoggerFactory.getLogger(UserController.class);

    @Autowired
    UserServiceImpl userService;

    @RequestMapping("getUserById/test")
    public @ResponseBody String getAll() {
        log.info("start..");
        WechatUser byId = userService.getById(12);
//        WechatUser userInfo = userService.queryUserById(12);
        return /*JSONUtils.toJSONString*/(byId.toString());
    }



}
